package com.songlanyun.modules.goods.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.songlanyun.modules.goods.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.songlanyun.modules.goods.model.vo.GoodsPageReq;
import com.songlanyun.modules.goods.model.vo.GoodsSlimVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 商家商品表
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-05 10:01:59
 */
@Mapper
public interface GoodsDao extends BaseMapper<Goods> {

    IPage<GoodsSlimVo> querySelfPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq goodsPageReq);

    IPage<GoodsSlimVo> queryAllPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq goodsPageReq);

    IPage<GoodsSlimVo> queryPlatformPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> queryProxyPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> queryShopPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> allPlatformPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> querySelfForActivityPage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    List<GoodsSlimVo> loadList(@Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> newAddedGoodsList(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    Integer loadCount(@Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    IPage<GoodsSlimVo> pointGoodsGage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq goodsPageReq);

    Integer saleGoodsNum(@Param("startTime") Long startTime, @Param("endTime") Long endTime);

    List<GoodsSlimVo> saleGoodsListByTime(@Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("limit") Integer limit);

    List<GoodsSlimVo> saleGoodsList(@Param("limit") Integer limit);

    List<GoodsSlimVo> smartRecommend(@Param("goodsPageReq") GoodsPageReq goodsPageReq);

    Integer goodsStatistics(@Param("shopId") Long shopId, @Param("added") Integer added);

    IPage<GoodsSlimVo> freeGoodsGage(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq goodsPageReq);

    IPage<GoodsSlimVo> randRecommend(IPage<GoodsSlimVo> page, @Param("goodsPageReq") GoodsPageReq paramsMapToReq);

    List<GoodsSlimVo> queryRecommend(@Param("goodsIds") List<Long> goodsIds);

    List<Goods> selectAreaGoods();
}
